#ifndef _ADAPTIVE_H_
#define _ADAPTIVE_H_

#include <iostream>
#include <map>
#include <queue>
#include "BaselineRandomWalk.h"

#define NODE_EFF_THRESHOLD 0.6945
#define EDGE_EFF_THRESHOLD 35.6573
#define MAX_ATTEMPTS 10

using namespace std;

class Adaptive : public BaseCrawler
{
public:
    Adaptive(API *network_) : BaseCrawler(network_) {}
	virtual void nextStep();
	virtual void crawl(int cost_limit);
protected:
  virtual void updateDiscoveredNode(int discoveredNode);
  virtual int nodeToExplore();

  virtual int telNodeToExplore();
  virtual int telNextStep();

  map<int, TIntQu> visit;
  priority_queue<TIntPr> q;

  THashSet<TInt> tel_visited;
};

#endif
